import request from "@/utils/request";

/**
 * 生成问卷 保存表单信息
 * @param data
 * @returns {*}
 */
export function saveSurvery(data) {
  return request({
    url: "/survery/saveSurvery",
    method: "POST",
    data,
  });
}

export function list(data) {
  return request({
    url: "/survery/list",
    method: "get",
    params: data,
  });
}

/**
 * 查询生成表单配置详情
 * @param id
 * @returns {*}
 */
export function surveryInfo(id) {
  return request({
    url: "/survery/surveryInfo/" + id,
    method: "GET",
  });
}

/**
 * 确认发布问卷
 * @param data
 * @returns {*}
 */
export function confirmRelease(data) {
  return request({
    url: "/survery/confirmRelease",
    method: "POST",
    data,
  });
}

export function confirmSound(data) {
  return request({
    url: "/survery/confirmSound",
    method: "POST",
    data,
  });
}
export function confirmDel(data) {
  return request({
    url: "/survery/confirmDel",
    method: "POST",
    data,
  });
}
export function confirmCopy(data) {
  return request({
    url: "/survery/confirmCopy",
    method: "POST",
    data,
  });
}

export function exportOCRExcel(data) {
  return request({
    url: "/survery/exportAiExcel",
    method: "GET",
    params: data,
  });
}

export function exportHLOCRExcel(data) {
  return request({
    url: "/survery/exportHLAiExcel",
    method: "GET",
    params: data,
  });
}

export function exportUberAiZip(data) {
  return request({
    url: "/survery/exportUberAiZip",
    method: "GET",
    params: data,
  });
}

export function exportBRAiZipPath(data) {
  return request({
    url: "/survery/exportBRAiZipPath",
    method: "GET",
    params: data,
  });
}

export function zipOssFolder(data) {
  return request({
    url: "/survery/zipOssFolder",
    method: "GET",
    params: data,
  });
}

export function aoiImport(data) {
  return request({
    url: "https://hncxsk.oss-cn-shenzhen.aliyuncs.com/",
    method: "post",
    data,
    headers: {
      "content-type": "multipart/form-data",
    },
  });
}
